home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / ivbsrc / resource.frm < prev    next >
Text File  |  1995-05-08  |  2KB  |  85 lines

  1. VERSION 2.00
  2. Begin Form Form1 
  3.    Caption         =   "Get Free Resources"
  4.    ClientHeight    =   2130
  5.    ClientLeft      =   1440
  6.    ClientTop       =   1830
  7.    ClientWidth     =   3030
  8.    Height          =   2535
  9.    Left            =   1380
  10.    LinkMode        =   1  'Source
  11.    LinkTopic       =   "Form1"
  12.    ScaleHeight     =   2130
  13.    ScaleWidth      =   3030
  14.    Top             =   1485
  15.    Width           =   3150
  16.    Begin CommandButton Command1 
  17.       Caption         =   "Get Resources"
  18.       Height          =   375
  19.       Left            =   720
  20.       TabIndex        =   0
  21.       Top             =   1560
  22.       Width           =   1575
  23.    End
  24.    Begin TextBox Text3 
  25.       Height          =   375
  26.       Left            =   1800
  27.       TabIndex        =   3
  28.       Top             =   1080
  29.       Width           =   975
  30.    End
  31.    Begin TextBox Text2 
  32.       Height          =   375
  33.       Left            =   1800
  34.       TabIndex        =   2
  35.       Top             =   600
  36.       Width           =   975
  37.    End
  38.    Begin TextBox Text1 
  39.       Height          =   375
  40.       Left            =   1800
  41.       TabIndex        =   1
  42.       Top             =   120
  43.       Width           =   975
  44.    End
  45.    Begin Label Label3 
  46.       Caption         =   "User Resources"
  47.       Height          =   255
  48.       Left            =   120
  49.       TabIndex        =   6
  50.       Top             =   1080
  51.       Width           =   1575
  52.    End
  53.    Begin Label Label2 
  54.       Caption         =   "GDI Resources"
  55.       Height          =   255
  56.       Left            =   120
  57.       TabIndex        =   5
  58.       Top             =   600
  59.       Width           =   1455
  60.    End
  61.    Begin Label Label1 
  62.       Caption         =   "System Resources"
  63.       Height          =   255
  64.       Left            =   120
  65.       TabIndex        =   4
  66.       Top             =   120
  67.       Width           =   1575
  68.    End
  69. End
  70. Declare Function GetFreeSystemResources Lib "User" (ByVal fuSysResource As Integer) As Integer
  71.  
  72. Const GFSR_SYSTEMRESOURCES = 0
  73. Const GFSR_GDIRESOURCES = 1
  74. Const GFSR_USERRESOURCES = 2
  75.  
  76. Sub Command1_Click ()
  77.   X% = GetFreeSystemResources(GFSR_SYSTEMRESOURCES)
  78.   Text1.Text = Str$(X%) + "%"
  79.   X% = GetFreeSystemResources(GFSR_GDIRESOURCES)
  80.   Text2.Text = Str$(X%) + "%"
  81.   X% = GetFreeSystemResources(GFSR_USERRESOURCES)
  82.   Text3.Text = Str$(X%) + "%"
  83. End Sub
  84.  
  85.